package com.yinhe.music.yhmusic.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yinhe.music.common.GlideHelper.GlideHelper;
import com.yinhe.music.yhmusic.R;
import com.yinhe.music.yhmusic.model.RadioClassify;

/**
 * Created by hasee on 2017/8/15.
 */

public class RadioClassifyAdapter extends BaseQuickAdapter<RadioClassify, BaseViewHolder> {

    public RadioClassifyAdapter() {
        super(R.layout.fragment_radio_classify_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, RadioClassify item) {
        helper.setText(R.id.name,item.getRadioClassifyName());
        ImageView image = helper.getView(R.id.radio_image);
        GlideHelper.setImageResource(image,item.getImage(),R.drawable.default_cover);
    }
}
